<!-- 公共组件-浙里办底部信息说明栏 -->
<template>
  <!-- 服务提供说明 -->
  <view class="server-desc" :style="{ fontSize: fontSize }">
    <p>本服务由浙江政务服务网，东阳教育局提供</p>
    <p>
      义务教育段招生咨询：
      <span @tap="callUp('0579-86655172')">86655172、</span>
      <span @tap="callUp('0579-86092791')">86092791</span>
    </p>
    <p>
      幼儿园招生咨询：
      <span @tap="callUp('0579-86655103')">86655103</span>
    </p>
    <p>
      技术支持电话：
      <span @tap="callUp('0579-86092966')">86092966</span>
    </p>
    <p>各校（园）招生咨询电话详见招生方案</p>
  </view>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, computed } from 'vue';
import { isElder } from '@/common/utils/util';
// ------------------接收传入参数(组件)-------------------
const props = defineProps({});
// ------------------钩子函数----------------------------
// 初始化
onMounted(() => {});
const fontSize = computed(() => {
  return isElder() ? '34rpx' : '24rpx';
});
// ------------------变量区------------------------------
// 主数据
const data = reactive({
  zlbFlag: true,
});
// ------------------方法区------------------------------
// 唤起电话
const callUp = (phoneNum: string) => {
  console.log('phoneNum = ', phoneNum);
  if (data.zlbFlag) {
    if (ZWJSBridge) {
      ZWJSBridge.phoneCall({
        corpId: phoneNum,
      })
        .then((result) => {
          console.log(result);
        })
        .catch((error) => {
          console.log(error);
        });
    } else {
      uni.makePhoneCall({
        phoneNumber: phoneNum,
      });
    }
  } else {
    uni.makePhoneCall({
      phoneNumber: phoneNum,
    });
  }
};
</script>
<style lang="scss" scoped>
.server-desc {
  margin: 50rpx 0;
  color: #a2a2a2;
  line-height: 1.8;
  text-align: center;
  span {
    color: #008cfc;
  }
}
</style>
